//
//  activityViewCell.m
//  EasyToTesco2.0
//
//  Created by 杨森 on 16/6/7.
//  Copyright © 2016年 EasyToTesco. All rights reserved.
//

#import "activityViewCell.h"

@interface activityViewCell()

@end

@implementation activityViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.actImg = [[UIImageView alloc] init];
        _actImg.frame = CGRectMake(0,0,WIDTH,HEIGHT/3.8);
        [self.contentView addSubview:_actImg];

        UIView *underView = [[UIView alloc] initWithFrame:CGRectMake(0,_actImg.Height/5*4,WIDTH,_actImg.Height/5)];
        underView.backgroundColor = [UIColor blackColor];
        underView.alpha = 0.7;
        [self.contentView addSubview:underView];
        
        UILabel *name = [[UILabel alloc] init];
        name.textColor = [UIColor whiteColor];
        [underView addSubview:name];
        self.actName = name;
        name.font = [UIFont systemFontOfSize:13];
        
        UILabel *price = [[UILabel alloc]init];
        price.textColor = [UIColor orangeColor];
        [underView addSubview:price];
        self.actPrice = price;
        name.font = [UIFont systemFontOfSize:13];
        price.textAlignment = NSTextAlignmentRight;
        
        [name mas_makeConstraints:^(MASConstraintMaker *make) {
           
            make.centerY.equalTo(underView.mas_centerY);
            make.left.equalTo(underView.mas_left).with.offset(15);
        }];
        
        [price mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.centerY.equalTo(underView.mas_centerY);
            make.right.equalTo(underView.mas_right).offset(-15);
        }];
        
        
    }
    return self;
}


@end
